public class Trapezoid {
    private double topBase;
    private double bottomBase;
    private double height;

    public Trapezoid(double topBase, double bottomBase, double height) {
        this.topBase = topBase;
        this.bottomBase = bottomBase;
        this.height = height;
    }

    public double calculateArea() {
        return (topBase + bottomBase)  height  2;
    }
}